]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
windowPreview: Make St.Label use single line mode
authorLeleat <atule@pm.me>
Fri, 23 Apr 2021 18:25:07 +0000 (20:25 +0200)
committerLeleat <atule@pm.me>
Wed, 28 Apr 2021 12:29:19 +0000 (14:29 +0200)
When a windowPreview is hovered or selected, it will show its window's
title as a caption. That title may contain Newline characters which will
effect the windowPreview size. Make the caption's St.Label use single
line mode to prevent that.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4162

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1822>

js/ui/windowPreview.js

index 84d80fe3ef2ccb32bedb3116ece325e7f148e997..e67ec9ec0ff984828253708abd55fe687657929e 100644 (file)
@@ -151,6 +151,7 @@ var WindowPreview = GObject.registerClass({
             text: this._getCaption(),
             reactive: true,
         });
+        this._title.clutter_text.single_line_mode = true;
         this._title.add_constraint(new Clutter.BindConstraint({
             source: windowContainer,
             coordinate: Clutter.BindCoordinate.X,